#include<iostream>
#include "Log.hpp"
#include "UdpServer.hpp"
#include <string>
#include "Common.hpp"
using namespace LogModule;
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        std::cerr << "Usage: " << argv[0] << " localport" << std::endl;
        Die(USAGE_ERR);
    }

    ENABLE_CONSOLE_LOG();
    std::string ip = argv[1];
    uint16_t port = std::stoi(argv[2]);



    std::unique_ptr<UDPServer> svr_uptr = std::make_unique<UDPServer>(ip,port);
    svr_uptr->InitServer();
    svr_uptr->Start();

    return 0;
}